This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 264
feat(PoolPage): When set input value, calculate the other input value. Validate if pool ratio is right #185
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
luizstacio
suggested changes
May 21, 2022
packages/app/src/config.ts
Outdated
@@ -11,9 +11,10 @@ export const TOKEN_ID = import.meta.env.VITE_TOKEN_ID!; | |||
export const DECIMAL_UNITS = 3; | |||
export const FAUCET_AMOUNT = parseUnits('0.5', DECIMAL_UNITS).toBigInt(); | |||
export const MINT_AMOUNT = parseUnits('2000', DECIMAL_UNITS).toBigInt(); | |||
export const ONE_ASSET = parseUnits('1', DECIMAL_UNITS).toBigInt(); | |||
export const ONE_ASSET_UNIT = parseUnits('1', DECIMAL_UNITS).toBigInt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not one unit, is ONE asset, a unit is a 1
one asset is 1000
if (!fromAmount) { | ||
throw new Error('"fromAmount" is required'); | ||
if (!fromInput.amount) { | ||
errors.push(`Inform ${coinFrom.name} amount`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enter ${x} amount
luizstacio
suggested changes
May 21, 2022
@luizstacio I changed both to zero again to make function accept any values (undefined / null / zero)... add validation to make sure it's not NaN of Infinity |
luizstacio
approved these changes
May 21, 2022
pedronauck
added a commit
that referenced
this pull request
May 23, 2022
…-select * 'master' of github.com:FuelLabs/swayswap: ci: add action for validate pull request (#178) feat: add user guided states on swap (#188) docs: add links for live previews (#183) feat(PoolPage): improve button feedback. reload/clear after create liquidity (#187) feat(PoolPage): When set input value, calculate the other input value. Validate if pool ratio is right (#185) feat: Save state of pool page (#164)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
reserve ratio
we haveadd_liquidity
ratio is rightCloses #179
Closes #148